<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<style>
	a:hover {
	    color: #58B3EA;
	}
    .menutop {
        background-color: #DDDDDD !important;
    }
    
    .menucolor {
        color: black !important;
    }
</style>

<body>
    <!--导航栏-->
    <div class="layui-head">
        <ul class="layui-nav menutop" lay-filter="">
            <li class="layui-nav-item layui-col-md-offset1"><a href="novelmain.action" class="menucolor">首页</a></li>
            <li class="layui-nav-item"><a href="ranking.action" class="menucolor">排行</a></li>
            <li class="layui-nav-item"><a href="serialranking.action" class="menucolor">连载</a></li>
            <li class="layui-nav-item"><a href="endranking.action" class="menucolor">完本</a></li>
            <c:if test="${loginuser.usertype == 2}">
	            <li class="layui-nav-item">
	                <a href="authormain.action?userid=${loginuser.userid }" class="menucolor"><img src="img/zuozhe.ico" class="layui-nav-img">作家专区</a>
	            </li>
            </c:if>
            <c:if test="${loginuser.usertype != 2}">
	            <li class="layui-nav-item">
	                <a href="" class="menucolor"></a>
	            </li>
            </c:if>
            
            <c:if test="${loginuser!=null}">
	            <li class="layui-nav-item layui-col-md-offset3">
	                <a href="myinformation.action?userid=${loginuser.userid}" class="menucolor">用户：${loginuser.userid}</a>
	            </li>            
	            <li class="layui-nav-item">
	                <a href="loginout.action" class="menucolor">退出登录</a>
	            </li>
            </c:if>
            <c:if test="${loginuser==null}">
	            <li class="layui-nav-item layui-col-md-offset4">
	                <a href="addnormaluser.jsp" class="menucolor">注册</a>
	            </li>
	            <li class="layui-nav-item">
	                <a href="login.jsp" class="menucolor">登录</a>
	            </li>
            </c:if>
            <c:if test="${loginuser==null}">
	            <li class="layui-nav-item">
	                <a href="login.jsp" class="menucolor"><img src="img/books.ico" class="layui-nav-img">我的书架</a>
	            </li>
            </c:if>
            <c:if test="${loginuser!=null}">
            	<li class="layui-nav-item">
	                <a href="mybooksroom.action?userid=${loginuser.userid}" class="menucolor"><img src="img/books.ico" class="layui-nav-img">我的书架</a>
	            </li>
            </c:if>
        </ul>
    </div>
</body>
<script src="layui/layui.js"></script>
<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function() {
        var element = layui.element;
    });
</script>

</html>